package frame.system.to;


import frame.base.BaseTo;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 对应表：sys_permission
 * <br>
 * @author PeiWentao
 * @since 2020-05-27 20:04
 */
 @Table(name = "sys_permission")
public class Permission extends BaseTo<Integer> {
 	// 根节点ID
    public static final Integer ROOT_ID = 1;
    public static final String TYPE_STATIC = "0";
    public static final String TYPE_DIR = "1";
    public static final String TYPE_MENU = "2";
    public static final String TYPE_INTERFACE = "3";

    @Id
    @GeneratedValue(generator = "JDBC")
    /** 主键*/
    private Integer id;
    
	/** 父级ID*/
	private Integer pid;
	/** 菜单等级*/
	private Object lv;
	/** 资源名*/
	private String name;
	/** 资源请求URL*/
	private String url;
	/** 类别 0静态资源 1目录 2菜单 3接口*/
	private String type;
	/** Shiro权限标记 xx:xx*/
	private String shiro;
	/** 图标class*/
	private String icon;
	/** 排序*/
	private Integer sorting;
  	
  	public Permission() {
	}
	public Permission(Integer id) {
		this.id = id;
	}
  	public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
	public Integer getPid() {
		return pid;
	}
	public Permission setPid(Integer pid) {
		this.pid = pid;
		return this;
	}
	public Object getLv() {
		return lv;
	}
	public Permission setLv(Object lv) {
		this.lv = lv;
		return this;
	}
	public String getName() {
		return name;
	}
	public Permission setName(String name) {
		this.name = name;
		return this;
	}
	public String getUrl() {
		return url;
	}
	public Permission setUrl(String url) {
		this.url = url;
		return this;
	}
	public String getType() {
		return type;
	}
	public Permission setType(String type) {
		this.type = type;
		return this;
	}
	public String getShiro() {
		return shiro;
	}
	public Permission setShiro(String shiro) {
		this.shiro = shiro;
		return this;
	}
	public String getIcon() {
		return icon;
	}
	public Permission setIcon(String icon) {
		this.icon = icon;
		return this;
	}
	public Integer getSorting() {
		return sorting;
	}
	public Permission setSorting(Integer sorting) {
		this.sorting = sorting;
		return this;
	}
	
}